<%@ page language="java" contentType="text/html; charset=UTF-8"  import="java.util.*,SiTuQingYou.vo.*,SiTuQingYou.util.*"
    pageEncoding="UTF-8"%>
    <%String path = request.getContextPath();%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="<%=path%>/houtai/res/css/amazeui.min.css" />
		<link rel="stylesheet" href="<%=path%>/houtai/res/css/admin.css" />
<title>Insert title here</title>
<style type="text/css">
		img{
		width:100px;
		height:90px;
		}
			table{
		margin:10px;
		padding: 10px;
		}
		td{
		background-color:#00FFFF;
		border:0px solid  gray;
		margin:10px;
		padding:10px;
		width:100px;
		}
		#tro1{
		width:600px;
		height:40px;
		}
		.cottt{
		display:-webkit-box;
		-webkit-box-orient:vertical;
		-webkit-line-clamp:1;
		overflow:hidden;
		text-overflow:ellipsis;
		}
		.aa{
		 display: inline-block;
		 width: 30px;
		 height: 30px;
		 background-color: #666;
		 color:#FFF;
		 text-align: center;
		 line-height: 30px;
		 border-radius: 15px;
		 text-decoration: none;
		 }
		</style>
</head>
<body>
<div class="admin-content-body">
			<div class="am-cf am-padding am-padding-bottom-0">
				<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">攻略管理</strong><small></small></div>
			</div>
			<hr>
			

			<div class="am-g">
				<div class="am-u-sm-12 am-u-md-6">
					<div class="am-btn-toolbar">
						<div class="am-btn-group am-btn-group-xs">
							<a id="daish"> 待审核攻略(<span id="abnum"><%=request.getAttribute("abnum")%></span>)</a>
						    
						</div>
					</div>
				</div>
				<div class="am-u-sm-12 am-u-md-3">
				</div>
				<div class="am-u-sm-12 am-u-md-3">
					<div class="am-input-group am-input-group-sm">
           				 <form  method="post" action="<%=path%>/houtai/checkstra.jsp">
						       <input type="text" name="key" >
						        <input type="submit" value="搜索">
						       </form>  
					</div>
				</div>
			</div>
				<br>
         <jsp:include page="/StratrhomeServlet">
         <jsp:param value="checkall" name="method"/>
         </jsp:include>
         <table>
         <tr>
         			<td>攻略图片</td>
					<td>攻略名称</td>
					<td  id="tro1">攻略内容</td>
					<td>攻略作者</td>
					<td>点赞</td>
					<td>收藏</td>
					<td>评论</td>
					<td>删除</td>
				</tr>
          <%
          ArrayList<Strategy> str = (ArrayList<Strategy>)request.getAttribute("checkall");
          for (Strategy stra:str){  %>
         <tr> <td><img src="<%=path%>/imagess/<%=stra.getPhoto()%>"</td>
                     <td><%=stra.getTitle()%></td>
                     <td><div class="cottt"> <%=stra.getContent()%></div></td>
                     <td><%=stra.getUser().getUsername() %></td>
                    <jsp:include page="../StrategyServlet">
						<jsp:param value="alllike" name="method"/>
						<jsp:param value="<%=stra.getId()%>" name="lovenum"/>
						
						</jsp:include>
						<%
            Integer likenum = (Integer)request.getAttribute("likenum");
			Integer collectnum = (Integer)request.getAttribute("collectnum");
%>
                     <td><%=likenum%></td>
                     <td><%=collectnum%></td>
                     <td><a id="comment"  cid="<%=stra.getId()%>"  href="javascript:void(0);">查</a></td>
            		<td><input   cid="<%=stra.getId()%>" type="button" id="delete" value="删除"></td>
            		</tr>
        	   <%    }      %>
          </table>
</body>
</html>